// 引入请求地址
import {reqHomePage} from '../../api/home.js'
// 书写逻辑
const state={
    homePageList: []
}
const getters={
}
const mutations={
    GETHOMEPAGE(state,hemePageList){
        state.homePageList = hemePageList
    }
}
const actions={
    async getHomePage({commit}){
        let result = await reqHomePage()
        if(result.code == 200){
            commit('GETHOMEPAGE',result.data)
        }
    } 
}

// 导出数据
export default {
    state,
    getters,
    mutations,
    actions
}